package org.mspring.search.task;

import java.util.Map;

import org.mspring.platform.task.AbstractTask;
import org.mspring.search.Searchable;

/**
 * 
 * @author Gao Youbo
 * @since 2013年8月5日
 */
public abstract class AbstractLuceneTask extends AbstractTask {
    protected Searchable getSearchableEntity(Map<Object, Object> paramMap) {
        if (paramMap == null) {
            return null;
        }
        Object searchable = paramMap.get("searchable");
        if (searchable == null || !(searchable instanceof Searchable)) {
            return null;
        }
        return (Searchable) searchable;
    }

}
